#ifndef INPUTMANAGER_H_
#define INPUTMANAGER_H_

#include <SDL.h>
#include "UIManager.h"
#include "KeyboardManager.h"
#include "Point2d.h"
#include "MouseEvent.h"
#include "KeyboardEvent.h"
#include "Texture.h"
#include "Video.h"

namespace Lame3d
{
	class InputManager
	{
		public:
			InputManager(const DisplayManager &d);
			~InputManager();
			
			KeyboardManager& Keyboard();
			UIManager& UI();
			const UIManager& UI() const;
			
			const Point2d& MouseLocation() const;
			
			void Handle();
			
		protected:
			Point2d mouseLocation;
			float mouseXDiff;
			float mouseYDiff;
			
			KeyboardManager keyboard;
			UIManager uiManager;
			
			const DisplayManager &displayManager;
			
			void handleKeyEvent(KeyEvent &e);
			void handleMouseClickEvent(MouseClickEvent &e);
			void handleMouseMotionEvent(MouseMotionEvent &e);
	};
}

#endif /*INPUTMANAGER_H_*/
